package com.itheima.pattern.decorator;


//具体的装饰者角色
public class Bacon extends Garnish{

    public Bacon(FastFood fastFood) {
        super(fastFood,2,"培根");
    }

    @Override
    public float cost() {
        return getPrice()+ getFastFood().cost();
    }

    @Override
    public String getDesc() {
        //鸡蛋加炒饭
        return super.getDesc()+getFastFood().getDesc();
    }
}
